function performance (name, cb, count = 1) {
    console.time(name);
    for (let i = 0; i < count; i++) {
        cb();
    }
    console.timeEnd(name);
}

performance('普通函数', () => {
    let i = 0;
    function fn () {
        i++;
    }
    for (let i = 0; i < 999999999; i++) {
        fn();
    }
});

performance('箭头函数', () => {
    let i = 0;
    const fn = () => {
        i++;
    }
    for (let i = 0; i < 999999999; i++) {
        fn();
    }
});

arr.sort((a, b) => a - b);
